﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Data;
using System.Web.UI.WebControls;
using eepg_contratos.Models;
using eepg_contratos.Utilities;

namespace eepg_contratos.Views.Contratos
{
    public partial class AgregarContrato : System.Web.Mvc.ViewPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);

            Literal mainTitle = (Literal)this.Master.FindControl("litApplicationName");
            Literal mainSubTitle = (Literal)this.Master.FindControl("litAuthorInformation");

            String codcontrato = Request.QueryString["codcontrato"] + "";
            String view = Request.QueryString["view"] + "";
            Session["CodContrato"] = codcontrato;
            Session["ViewContrato"] = view;
            

            if (view == "true")
            {
                mainTitle.Text = "VER CONTRATO";
                mainSubTitle.Text = "Permite ver la información de un contrato. En esta opción no puede modificar.";
            }
            else{
                mainTitle.Text = "EDITAR CONTRATO";
                mainSubTitle.Text = "Permite ingresar nuevo contrato o modificar uno existente.";
            }

            

        }
    }
}